package com.flysky.model.user;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name="flysky_user")
public class UserHbmModel implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	private String uuid;
	
	private String name;
	
	private String email;
	
	private String password;
	
	private Date createDate;
	
	private Date lastLoginDate;
	
	private Date birthday;
	
	private String birthplace;
	
	private String currentAddress;
	
	private String picutreLocation;
	
	private String jobFamily;

	@GenericGenerator(name="generator", strategy="uuid")
	@Id
	@GeneratedValue(generator="generator")
	@Column(name="uuid", unique=true,nullable=false,length=50)
	public String getUuid() {
		return uuid;
	}
	
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	
	@Column(name="user_name",nullable=false,length=25)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="email",nullable=false,length=40)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name="password",nullable=false,length=30)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name="create_date",nullable=false)
	public Date getCreateDate() {
		return createDate;
	}
	
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name="last_login_date",nullable=true)
	public Date getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	@Column(name="birthday_solar",nullable=true)
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name="birthplace",nullable=true,length=60)
	public String getBirthplace() {
		return birthplace;
	}

	public void setBirthplace(String birthplace) {
		this.birthplace = birthplace;
	}

	@Column(name="current_address",nullable=true,length=60)
	public String getCurrentAddress() {
		return currentAddress;
	}

	public void setCurrentAddress(String currentAddress) {
		this.currentAddress = currentAddress;
	}

	@Column(name="picture_location",nullable=true,length=100)
	public String getPicutreLocation() {
		return picutreLocation;
	}

	public void setPicutreLocation(String picutreLocation) {
		this.picutreLocation = picutreLocation;
	}

	@Column(name="job_family",nullable=true,length=40)
	public String getJobFamily() {
		return jobFamily;
	}

	public void setJobFamily(String jobFamily) {
		this.jobFamily = jobFamily;
	}
	
	@Override
	public String toString() {
		return "UserHbmModel [uuid=" + uuid + ", name=" + name + ", email="
				+ email + ", password=" + password + ", createDate="
				+ createDate + ", lastLoginDate=" + lastLoginDate
				+ ", birthday=" + birthday + ", birthplace=" + birthplace
				+ ", currentAddress=" + currentAddress + ", picutreLocation="
				+ picutreLocation + ", jobFamily=" + jobFamily + "]";
	}
	
}
